package Atop100;

public class Offer66 {

    public  int[]  find(int[] nums){
        int [] a=new int[nums.length];
        a[0]=1;
        for (int i = 1; i < nums.length; i++) {
            a[i]=a[i-1]*nums[i-1];
        }
        int tmp=1;
        for (int i = nums.length-2; i >=0 ; i--) {
            tmp=tmp*nums[i+1];
            a[i]=a[i]*tmp;
        }
        return a;
    }

}
